package com.neusoft.courseSelect.controller;

import com.google.gson.Gson;
import com.neusoft.data.domain.SerScore;
import com.neusoft.data.service.ISerScoreService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/score")
public class scoreDisplayController {

    @Autowired
    private ISerScoreService scoreService;

    @PostMapping("/barData")
    public AjaxResult barData(@RequestBody SerScore serScore) {
        return AjaxResult.success(scoreService.getBarData(serScore));
    }

    @PostMapping("/pieData")
    public AjaxResult scoreInfo(@RequestBody SerScore serScore) {
        return AjaxResult.success(scoreService.getPieData(serScore));
    }

}
